//
//  RZInputContainerView.h
//  RZIM
//
//  Created by reyzhang on 2021/8/17.
//  语音/文本输入切换工具条容器view

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

/*!
 输入工具栏的输入模式
 */
typedef NS_ENUM(NSInteger, KBottomBarStatus) {
    /*!
     初始状态
     */
    KBottomBarDefaultStatus = 0,
    /*!
     文本输入状态
     */
    KBottomBarKeyboardStatus,
    /*!
     功能板输入状态
     */
    KBottomBarPluginStatus,
    /*!
     表情输入状态
     */
    KBottomBarEmojiStatus,
    /*!
     语音消息输入状态
     */
    KBottomBarRecordStatus,
    /*!
     常用语输入状态
     */
    KBottomBarCommonPhrasesStatus,
    /*!
     阅后即焚输入状态
     */
    KBottomBarDestructStatus,
};

#define ChatSessionInputBar_Height 49.5f


@protocol YMInputContainerViewDelegate;
@interface YMInputContainerView : UIView
/*!
 语音与文本输入切换的按钮
 */
@property (strong, nonatomic) UIButton *switchButton;

/*!
 录制语音消息的按钮
 */
@property (nonatomic, strong) UIButton *recordButton;

/*!
 文本输入框
 */
@property (nonatomic, strong) UITextView *inputTextView;

/*!
 表情的按钮
 */
@property (nonatomic, strong) UIButton *emojiButton;

/*!
 扩展输入的按钮
 */
@property (nonatomic, strong) UIButton *additionalButton;

@property (nonatomic, assign) KBottomBarStatus currentBottomBarStatus;

/**
 输入框最大输入行数

 @discussion 该变量设置范围为: 1~6, 超过该范围会自动调整为边界值
 */
@property (nonatomic, assign) NSInteger maxInputLines;

//是否处于阅后即焚模式
@property (nonatomic, assign) BOOL destructMessageMode;

@property (nonatomic, assign) BOOL textViewBeginEditing;

@property (nonatomic, weak) id<YMInputContainerViewDelegate> delegate;


- (void)setBottomBarWithStatus:(KBottomBarStatus)bottomBarStatus;

@end




@protocol YMInputContainerViewDelegate <NSObject>

- (void)inputContainerViewSwitchButtonClicked:(YMInputContainerView *)inputContainerView;

- (void)inputContainerViewEmojiButtonClicked:(YMInputContainerView *)inputContainerView;

- (void)inputContainerViewAdditionalButtonClicked:(YMInputContainerView *)inputContainerView;

- (void)inputContainerView:(YMInputContainerView *)inputContainerView forControlEvents:(UIControlEvents)controlEvents;

- (void)inputContainerView:(YMInputContainerView *)inputContainerView didChangeFrame:(CGRect)frame;

- (BOOL)inputTextView:(UITextView *)inputTextView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text;
@end


NS_ASSUME_NONNULL_END
